<!--
Copyright (C) 2017 DataArt

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!DOCTYPE html>
<html lang="en">
<head>
  <title>AudioAnalysis - Audio capture events</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/static/dh_config/main.css">
  <style>
    .event {
        margin-bottom: 10px;
    }

    .event-timestamp {
        margin-right: 20px;
    }
  </style>
</head>
<body>
<div class="header">
  <div class="devecihive-logo-text"></div>
</div>

<div class="content">
  <div id="id_events_holder" class="events-holder"></div>
</div>
</body>
</html>

<script src="/static/dh_config/main.js"></script>
<script>
  document.addEventListener("DOMContentLoaded", function() {
      const eventsHolder = document.getElementById('id_events_holder');

      function getEvents() {
          function setEvents(events) {
              eventsHolder.innerHTML = events;
          }
          httpGetAsync('/events/update/', setEvents);
      }
      getEvents();
      setInterval(getEvents, 1000);
  });
</script>
